//********Rectangle class created by Niv

#ifndef _RECTANGLE_H_
#define _RECTANGLE_H_

#include "Point.h"
#include <iostream>
#include <Windows.h>
using namespace std;


void gotoxy(int, int);

class Rectangl
{
	int m_pointX, m_pointY, m_sizeX, m_sizeY;
	char m_symb;
	Point m_p, m_TL, m_TR, m_BL, m_BR;

	void drawRectangle1();
	void drawRectangle2();
	

public:
	
    Rectangl() //Constructor*/
	{
	    init();
	}

	void init();

	void setPos();

	void resetPos(int x, int y);

	void getPos(int &x, int &y);

	void setSize();

	void setSymbolPoint(char c);

	void setSymbolRectangle(char c);

	void drawPoint(char c);

	void goAndDrawRectangle(int drawingOption = 1);

	bool pointInRectangle(int x, int y);
	
	void calcRectanglePoint();

	void getPointTL(Point * p);

	void getPointTR(Point * p);

	void getPointBL(Point * p);

	void getPointBR(Point * p);
	
	bool isEqual(Rectangl * rec);

	bool isOverlap(Rectangl * rec);


};

#endif































